package com.supermap.business.cloud.commodity;

import com.alibaba.dubbo.config.annotation.Reference;
import com.supermap.dataservice.util.JSONUtils;
import com.supermap.dubbo.api.cloud.commodity.CommodityService;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * @author aqua
 * @desc
 * @date 2019年04月11 15:56
 * @email 1301584033@qq.com
 */
@Controller
@RequestMapping("/cloud/commodity")
public class CommodityController {

        @Reference(timeout = 10000)
        private CommodityService commodityService;

        @GetMapping("/getCommodityList")
        @ResponseBody
        public  JSONUtils getCommodityList(String commodityName,Integer pageNum,Integer pageSize){
            return  commodityService.getCommodityList(commodityName,(pageNum-1)*pageSize,pageSize);
        }



}
